// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//
// Copyright (c) 2015-2020 Andrey Antukh <niwi@niwi.nz>
// Copyright (c) 2015-2020 Juan de la Cruz <delacruzgarciajuan@gmail.com>

// TODO: rename to auth.scss

.auth {
  display: grid;
  grid-template-rows: auto;
  grid-template-columns: 33% auto;
  height: 100vh;
  overflow-y: scroll;
}

.auth-sidebar {
  grid-column: 1 / span 1;
  height: 100vh;
  display: flex;
  padding-top: 7vh;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background-color: #151035;
  background-image: url("/images/login-penpot.svg");
  background-position: center 30vh;
  background-size: 96%;
  background-repeat: no-repeat;

  .tagline {
    text-align: center;
    width: 280px;
    font-size: $fs18;
    margin-top: 2vh;
    color: white;
  }

  .logo {
    svg {
      fill: white;
      max-width: 11vw;
      height: 80px;
    }
    .hidden-name {
      visibility: hidden;
      width: 0;
      height: 0;
      float: left;
    }
  }
}

.auth-content {
  grid-column: 2 / span 1;
  background-color: $color-white;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;

  .form-container {
    width: 412px;
    flex-direction: column;
    margin-bottom: 30px;
    .auth-buttons {
      margin: $size-6 0 $size-4 0;
      display: flex;
      justify-content: center;
      column-gap: 17px;
    }

    form {
      margin: 2rem 0 0.5rem 0;
    }
  }

  input {
    margin-bottom: 0px;
  }

  .buttons-stack {
    display: flex;
    flex-direction: column;
    width: 100%;

    *:not(:last-child) {
      margin-bottom: $size-4;
    }
  }

  .btn-large {
    flex-grow: 1;
    font-size: 14px;
    font-style: normal;
    font-weight: normal;
  }

  .btn-google-auth {
    background-color: #4285f4;
    color: $color-white;
    margin-bottom: $size-4;
    text-decoration: none;
    .logo {
      width: 20px;
      height: 20px;
      margin-right: 1rem;
    }
    &:hover,
    &:focus {
      background-color: #2065d7;
      color: $color-white;
    }
  }

  .btn-gitlab-auth {
    background-color: #fc6d26;
    color: $color-white;
    margin-bottom: $size-4;
    text-decoration: none;

    .logo {
      width: 20px;
      height: 20px;
      margin-right: 1rem;
    }

    &:hover,
    &:focus {
      background-color: #ee5f18;
      color: $color-white;
    }
  }

  .btn-github-auth {
    background-color: #4c4c4c;
    color: $color-white;
    margin-bottom: $size-4;
    text-decoration: none;

    .logo {
      width: 20px;
      height: 20px;
      margin-right: 1rem;
    }

    &:hover,
    &:focus {
      background-color: #2f2f2f;
      color: $color-white;
    }
  }

  .link-oidc {
    text-align: center;
  }

  .separator {
    display: flex;
    justify-content: center;
    width: 100%;
    text-transform: uppercase;
    text-align: center;

    .text {
      margin: 0 10px;
      color: $color-gray-40;
    }

    .line {
      border: 1px solid $color-gray-10;
      flex-grow: 10;
      margin: auto;
    }
  }

  .links {
    display: flex;
    font-size: $fs14;
    flex-direction: column;
    justify-content: space-between;
    margin-top: $size-4;
    margin-bottom: $size-4;

    &.demo {
      justify-content: center;
      margin-top: $size-5;
    }

    .link-entry {
      font-size: $fs14;
      color: $color-gray-40;
      margin-bottom: 10px;
      a {
        font-size: $fs14;
        font-weight: 500;
        color: $color-gray-50;
        &:hover,
        &:focus {
          text-decoration: underline;
        }
      }
    }
  }

  .terms-login {
    bottom: $size-5;
    font-size: $fs14;
    position: absolute;

    span {
      margin: 0 $size-2;
      color: $color-gray-40;
    }
  }
}
